<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script src="<{$config.SITE_URL}>/include/js/jq.js"></script>
        <style>
            
            table{
                background-color:#ffffbe ;
                border: #B2CBFF solid;
                border-width: 1px 0 0 1px;
                padding: 0;
                font-size: 15px;
                font-family:楷体,仿宋;
            }
            table td,th{
                border: #B2CBFF solid;
                border-width: 0 1px 1px 0;
                margin:0;
                padding: 2px;
            }
            table th{
                color:red;
            }
        </style>
        <script>
            function delfav(commoid){
                $.ajax({
                    url:'myhome.php?m=myfavorite&delid='+commoid,
                    cache:false,
                    timeout:10000,
                    error:function(XMLHttpRequest,textStatus){
                            if(textStatus=='timeout'){
                                alert('请求超时，请重试！');
                            }else{
                                alert('请求失败');
                            }
                        },
                    success:function(html){
                        if(html!='1'){
                            alert('失败');
                        }else{
                            window.location.href=window.location.href;
                        }
                    }
                })
            }
        </script>
    </head>
    <body>
        <div>
            
            
            <table style="width: 700px;margin:5px;" cellspacing="0">
                
                <tr>
                    
                    <th width="80%"><b>宝贝名</b></th>
                    <th width="20%"><b>操作</b></th>
                    
                </tr>
                <{if $favolist|@count <=0}>
                <tr>
                    <td colspan="2">
                        暂无收藏
                    </td>
                </tr>
                <{/if}>
                <{section name=i loop=$favolist}>
                <tr>
                    <td>
                        <a href="<{$config.SITE_URL}>/commo.php?id=<{$favolist[i].commoid}>"><{$favolist[i].name}></a>
                    </td>
                    <td align="center"><a href="javascript:void(0)" onclick="delfav(<{$favolist[i].commoid}>)">删除</a></td>
                </tr>
                <{/section}>
            </table>
            <p><{$page}></p>
        </div>
    </body>
</html>
